﻿using System.IO;
using System.Windows.Forms;

namespace Z.IconLibraryGenerator.WinForm
{
    public class My
    {
        public enum PageType
        {
            Default,
            ProjectSettings,
            ProjectExecute
        }

        public static Page CurrentPage;
        public static HtmlElement BodyHook;
        public static ProjectConfiguration CurrentProject;


        private static ApplicationConfiguration _ApplicationConfiguration;

        public static ApplicationConfiguration ApplicationConfiguration
        {
            get
            {
                if (_ApplicationConfiguration == null)
                {
                    _ApplicationConfiguration = ApplicationConfiguration.Load();
                }

                return _ApplicationConfiguration;
            }
        }

        public class TemplateFile
        {
            public static DirectoryInfo ProjectFile = new DirectoryInfo("TemplateFile/ProjectFile");
            public static DirectoryInfo ProjectIconFile = new DirectoryInfo("TemplateFile/ProjectIconFile");
            public static DirectoryInfo SupportFile = new DirectoryInfo("TemplateFile/SupportFile");
            public static DirectoryInfo SupportIconFile = new DirectoryInfo("TemplateFile/SupportIconFile");
        }

        public class Url
        {
            public static string Default = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "template", "default.html");
            public static string ProjectSettings = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "template", "project-settings.html");
            public static string ProjectExecute = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "template", "project-execute.html");
        }
    }
}